package com.onlinesshop.mall.pojo;

import java.io.Serializable;

/**
 * 购物车
 */
public class ShopCart implements Serializable {
    private int id;     //主键 id
    private int product_id;         //商品表id
    private int user_id;            //用户表id
    private int quantity;           //购物车数量
    private int checked;            //是否勾选 1-已勾选  2-未勾选
    private String create_time;     //加入购物车时间
    private String update_time;     //更新时间
    private User user;              //用户
    private Product product;        //商品

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getProduct_id() {
        return product_id;
    }

    public void setProduct_id(int product_id) {
        this.product_id = product_id;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public int getChecked() {
        return checked;
    }

    public void setChecked(int checked) {
        this.checked = checked;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(String update_time) {
        this.update_time = update_time;
    }

    @Override
    public String toString() {
        return "ShopCart{" +
                "id=" + id +
                ", product_id=" + product_id +
                ", user_id=" + user_id +
                ", quantity=" + quantity +
                ", checked=" + checked +
                ", create_time='" + create_time + '\'' +
                ", update_time='" + update_time + '\'' +
                ", user=" + user +
                ", product=" + product +
                '}';
    }
}
